package cn.patient.pp.module.patients.service;

import cn.patient.pp.framework.common.pojo.PageResult;
import cn.patient.pp.framework.common.util.object.BeanUtils;
import cn.patient.pp.module.patients.controller.admin.vo.importExecl.OperationsLogVO;
import cn.patient.pp.module.patients.dal.dataobject.patients.OperationsLogDO;
import cn.patient.pp.module.patients.dal.mysql.patients.OperationsLogMapper;
import cn.patient.pp.module.patients.service.OperationsLogService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author liqingsong
 * @version 1.0
 * Create by 2025/4/28
 */
@Service
@Validated
    public class OperationsLogServiceImpl implements OperationsLogService {
    @Resource
    private OperationsLogMapper operationsLogMapper;

    @Override
    public Integer createOperationsLog(OperationsLogVO createReqVO) {
        // 插入
        OperationsLogDO operationsLog = BeanUtils.toBean(createReqVO, OperationsLogDO.class);
        operationsLogMapper.insert(operationsLog);
        // 返回
        return operationsLog.getId();
    }

    @Override
    public void insertBatch(List<OperationsLogVO> createReqVO) {
        List<OperationsLogDO> operationsLog = BeanUtils.toBean(createReqVO, OperationsLogDO.class);
        operationsLogMapper.insertBatch(operationsLog);
    }

    @Override
    public void updateOperationsLog(OperationsLogVO updateReqVO) {

    }

    @Override
    public void deleteOperationsLog(Integer id) {

    }

    @Override
    public OperationsLogDO getOperationsLog(Integer id) {
        return null;
    }

    @Override
    public PageResult<OperationsLogDO> getOperationsLogPage(OperationsLogVO pageReqVO) {
        return null;
    }


}

